-- CALC_COMPOUND_MATERIAL

-- 计算合成所需材料
return function(user, material, type)
    local prop;
    local map = {};

    for classId, count in pairs(material) do
        -- 合成需求降低的属性，先算数值，再算百分比
        prop = PropM.combine(user, "material_down2", classId);
        count = PropM.apply(prop, count);

        prop = PropM.combine(user, "material_down", classId);
        count = PropM.apply(prop, count);

        -- 合成古遗迹碎片消耗降低属性
        if classId == 10000 then
            prop = PropM.combine(user, "combine_cost", type);
            count = PropM.apply(prop, count);
        end

        map[classId] = count;
    end

    return map;
end
